import request from '@/utils/request'

export function query(data) {
  return request({
    url: `mes/m/repair/fault/query`,
    method: 'post',
    data
  })
}

export function remove(data) {
  return request({
    url: `mes/m/repair/fault/delete`,
    method: 'delete',
    data
  })
}
// 新增或修改
export function save(data) {
  return request({
    url: `mes/m/repair/fault/save`,
    method: 'put',
    data
  })
}
// 导出
export function exportData() {
  return request({
    url: `mes/m/repair/fault/export`,
    responseType: 'blob',
    method: 'get'
  })
}
// 导入文件
export function importFile(data) {
  return request({
    url: `mes/m/repair/fault/importFile`,
    headers: { 'Content-Type': 'multipart/form-data' },
    method: 'post',
    data
  })
}
// 下载模板
export function downLoadFile() {
  return request({
    url: `mes/m/repair/fault/download`,
    responseType: 'blob',
    method: 'get'
  })
}
